package com.sharemarking.wa.common.eum;

/**
 * @author dxy
 */
public enum OrderStateEum {
    UNTREATED(0, "待处理"),
    END(1, "已完结"),
    CANCEL(2,"已取消"),
    RECEIPT(3,"待经营商接单"),
    UNPAID(4,"待付款"),
    TRANSPORT_RECEIPT(5,"待运输单位接单"),
    DRIVER_CONFIRM(6,"待司机确认"),
    NO_TRANSPORT(7,"待运"),
    TRANSPORTING(8,"运输中"),
    CHILD_ORDER_FINISH(9,"已完成"),
    CHILD_ORDER_CANCEL(10,"取消接单")
    ;
    private Integer key;
    private String value;

    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    OrderStateEum(Integer key, String value) {
        this.key = key;
        this.value = value;
    }
    public static String getValue(String index) {
        for (OrderStateEum item : OrderStateEum.values()) {
            if (item.getKey().equals(index)) {
                return item.value;
            }
        }
        return null;
    }
}
